from rest_framework.permissions import BasePermission
from management.utils import judgement_type


class isTeacher(BasePermission):
    def has_permission(self, request, view):
        type = judgement_type.usertype(request)
        if type == 2:
            return True
        else:
            return False

